package com.dts.backproject.controller;
import com.dts.backproject.entity.po.Mask;
import com.dts.backproject.repository.MaskRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RestController
@RequestMapping("/mask")
public class MaskController {

    @Autowired
    private MaskRepository maskRepository;

    @GetMapping("/all")
    public Iterable<Mask> getAllMasks() {
        return maskRepository.findAll();
    }
}